package test.org.offsync.util
import org.junit.runner.notification.RunListener
import org.junit.runner.notification.Failure
import org.junit.runner.Description
import org.junit.runner.Result

object ChatSimulationMain {
  def main(args: Array[String]): Unit = {
    val runner = new org.specs2.runner.JUnitRunner(classOf[ChatSimulation])
    runner.run(new org.junit.runner.notification.RunNotifier {
      override def addFirstListener(listener: RunListener): Unit = {
        println("addFirstListener")
      }
      
      override def addListener(listener: RunListener): Unit = {
        println("addListener")
      }
      
      override def fireTestAssumptionFailed(failure: Failure): Unit = {
        println("fireTestAssumptionFailed")
      }
      
      override def fireTestFailure(failure: Failure): Unit = {
        println("FAIL: " + failure.getMessage())
      }
      
      override def fireTestFinished(description: Description): Unit = {
        println("Test finished: " + description.getDisplayName())
      }
      
      override def fireTestIgnored(description: Description): Unit = {
        println("fireTestIgnored")
      }
      
      override def fireTestRunFinished(result: Result): Unit = {
        println("fireTestRunFinished[Failures: " + result.getFailureCount() + ", Runs: " + result.getRunCount() + "]")
      }
      
      override def fireTestRunStarted(description: Description): Unit = {
        println("Starting test run: " + description.getDisplayName())
      }
      
      override def fireTestStarted(description: Description): Unit = {
        println("Test started: " + description)
      }
      
      override def pleaseStop(): Unit = {
        println("pleaseStop")
      }
      
      override def removeListener(listener: RunListener): Unit = {
        println("removeListener")
      }
    })
  }
}